package com.wwj.server.utils;

import java.util.HashMap;
import java.util.Map;

public class ExtraUtil {

    public static Map<String,String> getExtraData(String extra){
        Map<String,String> result = null;
        if(null != extra && !"".equals(extra)) {
            result = new HashMap<>();
            String[] temp1 = extra.split(",");
            if(temp1.length > 0) {
                for (String str : temp1) {
                    String[] temp2 = str.split("=");
                    if(temp2.length > 1) {
                        result.put(temp2[0],temp2[1]);
                    }
                }
            }
        }
        return result;
    }
}
